import 'package:angular/angular.dart';

@NgController(selector:'[user-profile]', publishAs:'controller')
class UserProfileController
{
  User user;
  UserProfileController()
  {
    user= new User('Foysal');
  }
  
  void clear()
  {
    user.name = '';
  }
  
}

class User
{
  String name;
  
  User(this.name)
  {
    
  }
}

class UserModule extends Module {
  UserModule()
  {
    type(UserProfileController);    
  }
}

void main() {
  ngBootstrap(module: new UserModule());
}
